// 使用变量定义主题颜色
@primary-color: #1890ff;
@heading-color: rgba(0, 0, 0, 0.85);
@text-color-secondary: rgba(0, 0, 0, 0.45);
@screen-md: 768px;

// 背景动画
@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.8);
        opacity: 0.9;
    }

    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

.loginContainer {
    min-height: 100vh;
    background: linear-gradient(135deg, @primary-color 0%, darken(@primary-color, 10%) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;

    // 添加网格底纹
    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image:
            linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
        background-size: 20px 20px;
        background-position: center center;
    }

    // 添加装饰性圆形
    &::after {
        content: '';
        position: absolute;
        width: 500px;
        height: 500px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
        top: -150px;
        right: -150px;
        animation: pulse 4s ease-in-out infinite;
    }

    // 添加浮动的几何图形
    .geometricShapes {
        position: absolute;
        width: 100%;
        height: 100%;
        pointer-events: none;

        &::before {
            content: '';
            position: absolute;
            width: 300px;
            height: 300px;
            border: 2px solid rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            top: 15%;
            left: 10%;
            transform: rotate(-15deg);
            animation: float 2s ease-in-out infinite;
        }

        &::after {
            content: '';
            position: absolute;
            width: 250px;
            height: 250px;
            border: 2px solid rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            bottom: 15%;
            right: 10%;
            animation: float 2s ease-in-out infinite reverse;
        }
    }
}

.loginWrapper {
    display: flex;
    max-width: 1000px;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    position: relative;
    z-index: 1;
}

.leftSection {
    flex: 1;
    background: linear-gradient(135deg, #f5f8ff 0%, #e6f7ff 100%);
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;

    &::before {
        content: '';
        position: absolute;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(24, 144, 255, 0.1) 0%, rgba(24, 144, 255, 0) 50%);
        animation: pulse 8s ease-in-out infinite;
    }

    @media screen and (max-width: @screen-md) {
        display: none;
    }
}

.illustration {
    max-width: 100%;
    height: auto;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.loginCard {
    flex: 1;
    max-width: 480px;
    border: none;
    padding: 48px 40px;
    background: transparent;

    @media screen and (max-width: @screen-md) {
        max-width: 100%;
    }
}

.title {
    font-size: 28px;
    font-weight: 600;
    color: @heading-color;
    text-align: center;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 16px;
    color: @text-color-secondary;
    text-align: center;
    margin-bottom: 40px;
}

.loginForm {
    :global {
        .ant-form-item {
            margin-bottom: 24px;
        }

        .ant-input-affix-wrapper {
            height: 44px;
            padding: 0 16px;
        }

        .ant-btn {
            height: 44px;
            font-size: 16px;
        }
    }
}

.socialLogin {
    display: flex;
    justify-content: center;
    margin-top: 24px;

    .wechatBtn {
        background-color: #07c160;
        border-color: #07c160;
        color: #fff;

        &:hover,
        &:focus {
            background-color: #06ae56;
            border-color: #06ae56;
            color: #fff;
        }
    }

    .alipayBtn {
        background-color: #1677ff;
        border-color: #1677ff;
        color: #fff;

        &:hover,
        &:focus {
            background-color: #0e5fd9;
            border-color: #0e5fd9;
            color: #fff;
        }
    }
}

.callbackContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, @primary-color 0%, darken(@primary-color, 10%) 100%);

    :global {
        .ant-spin {
            color: #fff;

            .ant-spin-text {
                color: #fff;
                margin-top: 8px;
                font-size: 16px;
            }
        }
    }
}